<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:t="http://myfaces.apache.org/tomahawk"
	xmlns:v="http://corejsf.com/validator">

<f:view>
	<f:loadBundle var="text" basename="#{maquinaForm.bundleName}" />
	<head>
	<title>#{text['maquinaDetail.title']}</title>
	<meta name="heading" content="#{text['maquinaDetail.heading']}" />
	<style type="text/css">
.jscalendar-DB-div-style {
	position: absolute;
	margin-top: -120px;
	margin-left: -508px;
}
</style>
	</head>
	<body id="maquinaForm">

	<h:form id="maquinaForm" onsubmit="return validateMaquinaForm(this)">
		<h:inputHidden value="#{maquinaForm.maquina.id}" id="id" />
		<h:panelGrid columns="3">

			<!-- Marca -->
			<h:outputLabel styleClass="desc" for="marca"
				value="#{text['maquina.marca']}" />
			<t:message for="marca" styleClass="fieldError" />

			<h:inputText styleClass="text medium" id="marca"
				value="#{maquinaForm.maquina.marca}" required="true" maxlength="255">
				<v:commonsValidator type="required" arg="#{text['maquina.marca']}" />
			</h:inputText>

			<!-- Modelo -->
			<h:outputLabel styleClass="desc" for="modelo"
				value="#{text['maquina.modelo']}" />
			<t:message for="modelo" styleClass="fieldError" />

			<h:inputText styleClass="text medium" id="modelo"
				value="#{maquinaForm.maquina.modelo}" required="true"
				maxlength="255">
				<v:commonsValidator type="required" arg="#{text['maquina.modelo']}" />
			</h:inputText>

			<!-- Serie -->
			<h:outputLabel styleClass="desc" for="noSerie"
				value="#{text['maquina.noSerie']}" />
			<t:message for="noSerie" styleClass="fieldError" />

			<h:inputText styleClass="text medium" id="noSerie"
				value="#{maquinaForm.maquina.noSerie}" required="true"
				maxlength="255">
				<v:commonsValidator type="required" arg="#{text['maquina.noSerie']}" />
			</h:inputText>

			<!-- Galga  -->
			<h:outputLabel styleClass="desc" for="galga"
				value="#{text['maquina.galga']}" />
			<t:message for="galga" styleClass="fieldError" />

			<h:inputText styleClass="text medium" id="galga"
				value="#{maquinaForm.maquina.galga}" required="true" maxlength="255">
				<v:commonsValidator type="required" arg="#{text['maquina.galga']}" />
			</h:inputText>

			<!-- Estatus -->
			<h:outputLabel styleClass="desc" for="estatus"
				value="#{text['maquina.estatus']}" />
			<t:message for="estatus" styleClass="fieldError" />

			<h:inputText styleClass="text medium" id="estatus"
				value="#{maquinaForm.maquina.estatus}" required="false"
				maxlength="255">
			</h:inputText>

			<br></br>
			<br></br>

			<h:panelGroup styleClass="buttonBar bottom">
				<h:commandButton value="#{text['button.save']}"
					action="#{maquinaForm.save}" id="save" styleClass="button" />

				<c:if test="${not empty maquinaForm.maquina.id}">
					<h:commandButton value="#{text['button.delete']}"
						action="#{maquinaForm.delete}" id="delete" styleClass="button"
						onclick="bCancel=true; return confirmDelete('Maquina')" />
				</c:if>

				<h:commandButton value="#{text['button.cancel']}" action="cancel"
					immediate="true" id="cancel" styleClass="button"
					onclick="bCancel=true" />
			</h:panelGroup>
			<h:outputText />
			<h:outputText />
		</h:panelGrid>
	</h:form>

	<v:validatorScript functionName="validateMaquinaForm" />

	<script type="text/javascript">
	//Form.focusFirstElement($('maquinaForm'));
	highlightFormElements();
</script>

	</body>
</f:view>
</html>
